home *** CD-ROM | disk | FTP | other *** search
/ L' Effet Pommier 3 / L'Effet Pommier - Volume 03.iso / Programmation / Gooey1.3.1 / C Templates / Menu.c < prev    next >
Text File  |  1994-04-13  |  4KB  |  148 lines

  1. $$Message User Menu, u:menu$Prototype.name$.h
  2. $$File u:menu$Prototype.name$.h
  3. /*  $CopyRight$ */
  4. /*  menu$Prototype.name$                Handle menus
  5.  
  6.     File name:  menu$Prototype.name$.h  
  7.     Function:  This contains the routines to handle menus.
  8.     History: $Date$ Original by $Author$
  9.  
  10.    */
  11.  
  12. /* ======================================================= */
  13. /* ======================================================= */
  14.  
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18.  
  19. /* Extra to Initialize the menubar */
  20. void AddExtraMenus(void);
  21.  
  22. $$Loop Menus
  23. void Do_$Menu.name$Menu(Boolean Doing_Pre,short theItem,Boolean *SkipProcessing);
  24.  
  25. $$EndLoop Menus
  26. $$Loop HierMenus
  27. void Do_$Menu.name$Menu(Boolean Doing_Pre,short theItem,Boolean *SkipProcessing);
  28.  
  29. $$EndLoop HierMenus
  30. /* Handle other menu lists */
  31. void Handle_Other_Menus(short theMenu, short theItem);
  32.  
  33. #ifdef __cplusplus
  34. }
  35. #endif
  36.  
  37. /* ======================================================= */
  38. /* ======================================================= */
  39. $$CloseFile
  40. $$Message User Menu, u:menu$Prototype.name$.c
  41. $$File u:menu$Prototype.name$.c
  42. /*  $CopyRight$ */
  43. /*  menu$Prototype.name$                Handle menus
  44.  
  45.     File name:  menu$Prototype.name$.c  
  46.     Function:  This contains the routines to handle menus.
  47.     History: $Date$ Original by $Author$
  48.  
  49.    */
  50.  
  51. #include "mmCommon$Prototype.name$.h"    /* Common */
  52. #include "Common$Prototype.name$.h"        /* Common */
  53.  
  54. #include "menu$Prototype.name$.h"        /* This file */
  55.  
  56. #pragma segment Menus
  57.  
  58. /* ======================================================= */
  59. /* ======================================================= */
  60.  
  61. /* Routine: AddExtraMenus */
  62. /* Purpose: Add in any extra menus */
  63.  
  64. void AddExtraMenus(void)
  65. {
  66.  
  67. }
  68.  
  69. /* ======================================================= */
  70.  
  71. $$Loop Menus
  72.  
  73. /* Routine: Do_$Menu.name$Menu */
  74. /* Purpose: Handle any menu items for the $Menu.FullName$ menu. */
  75. /* Get the main handler to ignore this menu item by changing SkipProcessing   to be TRUE. */
  76.  
  77. void Do_$Menu.name$Menu(Boolean Doing_Pre,short theItem,Boolean *SkipProcessing)
  78. {
  79.  
  80. *SkipProcessing = FALSE;                            /* Set to not skip the processing of this menu item */
  81.  
  82. switch (theItem)                                    /* Handle all commands in this menu list */
  83.     {
  84.     $$Loop MenuItems
  85.     case MItem_$MenuItem.name$:                        /* For item $MenuItem.FullName$ */
  86.         if (Doing_Pre)
  87.             {
  88.             }
  89.         else
  90.             {
  91.             }
  92.         break;
  93.     $$EndLoop MenuItems
  94.     default:                                    /* allow other buttons, trap for debug */
  95.         break;                                /* end of otherwise */
  96.     }                                            /* end of switch */
  97.  
  98. }
  99.  
  100. /* ======================================================= */
  101. $$EndLoop Menus
  102. $$Loop HierMenus
  103.  
  104. /* Routine: Do_$Menu.name$Menu */
  105. /* Purpose: Handle any menu items for the $Menu.FullName$ menu. */
  106. /* Get the main handler to ignore this menu item by changing SkipProcessing   to be TRUE. */
  107.  
  108. void Do_$Menu.name$Menu(Boolean Doing_Pre,short theItem,Boolean *SkipProcessing)
  109. {
  110.  
  111. *SkipProcessing = FALSE;                            /* Set to not skip the processing of this menu item */
  112.  
  113. switch (theItem)                                    /* Handle all commands in this menu list */
  114.     {
  115.     $$Loop MenuItems
  116.     case MItem_$MenuItem.name$:                        /* For item $MenuItem.FullName$ */
  117.         if (Doing_Pre)
  118.             {
  119.             }
  120.         else
  121.             {
  122.             }
  123.         break;
  124.     $$EndLoop MenuItems
  125.     default:                                    /* allow other buttons, trap for debug */
  126.         break;                                /* end of otherwise */
  127.     }                                            /* end of switch */
  128.  
  129. }
  130.  
  131. /* ======================================================= */
  132. $$EndLoop HierMenus
  133. /* ======================================================= */
  134.  
  135. /* Routine: Handle_Other_Menus */
  136. /* Purpose: Handle special menus */
  137.  
  138. void Handle_Other_Menus(short theMenu,short  theItem)
  139. {
  140.  
  141. }
  142.  
  143. /* ======================================================= */
  144. /* ======================================================= */
  145. $$CloseFile
  146.  
  147.  
  148.